﻿using System;

namespace NBox.Service.Communication
{
    public interface IServiceContainer
    {
        void AddService(string key, Type serviceType, Type implType, bool isSingleton);

        void AddService(Type serviceType, Type implType, bool isSingleton);

        void AddServiceInstance(string key, Type serviceType, object instance);

        void AddServiceInstance(Type serviceType, object instance);

        IServiceType GetService<IServiceType>(string key);

        object GetService(Type serviceType);

        IServiceType GetService<IServiceType>();

        object GetService(string key);

        bool RemoveService(string key);

        bool RemoveService(Type serviceType);
    }
}
